#include<iostream>
#include<deque>
using namespace std;
const int SIZE = 1000;
const int MAX_WIN = 20;
const int MAX_T = (17-8)*60;


int main(int argc, char const *argv[])
{
    freopen("test.txt","r",stdin);
    int N,M,K,Q; cin>>N>>M>>K>>Q;
    int pro_time[SIZE]; for(int i = 0;i<K;++i) scanf("%d",pro_time+i);
    int pro_time_copy[SIZE]; copy(pro_time,pro_time+K,pro_time_copy);
    int fin_time[SIZE]{0};
    
    int ct = 0;
    deque<int> dq;for(int i=0;i<K;++i) dq.push_back(i);
    deque<int> dq_wins[MAX_WIN];

    while(1)
    {
        if(!dq.empty())
        {
            int min_num=M+1, min_win = 0;
            do
            {
                min_num = M+1;
                for(int i = 0;i<N;++i)
                {
                    if(dq_wins[i].size() < min_num)
                        { min_num = dq_wins[i].size(); min_win = i; }
                }
                if(min_num < M)
                {
                    int c = dq.front(); dq.pop_front();
                    dq_wins[min_win].push_back(c);
                }
            } while (!dq.empty() && min_num<M);
        }

        ct++;
        for(int i = 0;i<N;++i)
        {
            if( !dq_wins[i].empty() && ! --pro_time[dq_wins[i].front()])
            {
                fin_time[dq_wins[i].front()] = ct;
                dq_wins[i].pop_front();
            }
        }
        int flag = 1;
        if(!dq.empty())flag = 0;
        for(int i = 0;i<N;++i)
        {
            if(!dq_wins[i].empty())
                {flag = 0;break;}
        }
        if(flag) break;
    }

    for(int i = 0;i<Q;++i)
    {
        int tmp; scanf("%d",&tmp); tmp--;
        if(fin_time[tmp]-pro_time_copy[tmp] >= MAX_T)
        {
            printf("Sorry\n");continue;
        }
        int hour = fin_time[tmp]/ 60, min = fin_time[tmp]%60;
        printf("%02d:%02d\n",8+hour,min);
    }
    
    return 0;
}
